/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ac.za.cput.xalisa.designpatterns.creational.abstractFactory;

/**
 *
 * @author Enkosi
 */
public class AbstractFactory {
    private Computer comp;
    public Computer getComputer(String compuString){
        if(compuString.equalsIgnoreCase("PC"))
            comp = new PC();
        else if(compuString.equalsIgnoreCase("workstation"))
            comp = new Workstation();
        else if(compuString.equalsIgnoreCase("server"))
            comp = new Server();
        
        return comp;
    }
}
